﻿CREATE VIEW dbo.BoatMake_View
AS
SELECT DISTINCT (SELECT     CASE WHEN manufacturer <> 'unknown' THEN manufacturer + CASE WHEN Boatrange = manufacturer OR
                                                                boatrange IS NULL THEN '' ELSE char(9) + boatrange END ELSE CASE WHEN Boatrange = manufacturer OR
                                                                boatrange IS NULL THEN '' ELSE BoatRange END END AS Expr1) AS boatmake, BoatRange, Manufacturer
FROM         dbo.GenBoatData_Tbl